<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html">

<ui:composition template="/template.xhtml">

	<ui:define name="content">
		<h3>Path based configured contracts - work only if no contract is selected below!</h3>
		<ul>
			<li>
				<h:link outcome="/user/index.xhtml">Go to /user/index.xhtml</h:link>
				contracts config resolves to "blue,warbase" (blue template has absolute reference to /contracts/warbase/template.xhtml).
			</li>
			<li>
				<h:link outcome="/red/index.xhtml">Go to /red/index.xhtml</h:link>
				contracts config resolves to "red,warbase" (red template has absolute reference to /contracts/warbase/template.xhtml).
			</li>
			<li>
				<h:link outcome="/green/index.xhtml">Go to /green/index.xhtml</h:link>
				contracts config resolves to "green,jarbase" (green template has absolute reference to /contracts/jarbase/template.xhtml).
			</li>
		</ul>

		<h3>Choose contracts:</h3>
		<h:form prependId="false">
			<h:selectOneMenu id="selectOne" value="#{contractsBean.contracts}" 
					layout="pageDirection" required="false">
				<f:selectItem itemValue="" itemLabel="none preset" />
				<f:selectItem itemValue="warbase" itemLabel="warbase" />
				<f:selectItem itemValue="jarbase" itemLabel="jarbase" />
				<f:selectItem itemValue="red,warbase" itemLabel="red,warbase" />
				<f:selectItem itemValue="red,jarbase" itemLabel="red,jarbase" />
				<f:selectItem itemValue="blue,warbase" itemLabel="blue,warbase" />
				<f:selectItem itemValue="blue,jarbase" itemLabel="blue,jarbase" />
				<f:selectItem itemValue="green,warbase" itemLabel="green,warbase" />
				<f:selectItem itemValue="green,jarbase" itemLabel="green,jarbase" />
			</h:selectOneMenu>
			<h:commandButton id="apply" value="Apply" />
		</h:form>
	</ui:define>

</ui:composition>
</html>
